<?php
require 'vendor/autoload.php';

use \Hprose\Future;
use \Hprose\Socket\Client;

$test = new Client("tcp://192.168.0.22:4321");
$test->fullDuplex = true;
$action = trim($_GET['action']);
if( empty($action) ){
	return;
}

Future\co(function() use($test,$action){
    //try{
        var_dump((yield $test->executeAction($action)));
    //}catch(\Exception $e){
    //    echo $e->getMessage() . PHP_EOL;
    //    echo $e->getTraceAsString();
    //}
});